package com.ruibang.glass.material.entity.cl;

import com.alibaba.fastjson.annotation.JSONField;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.teaming.cloud.framework2.common.pojo.BaseEntity;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import org.springframework.format.annotation.DateTimeFormat;

import java.io.Serializable;
import java.math.BigDecimal;
import java.time.LocalDate;
import java.util.Date;

/**
 * <p>
 * 原材料库存管理表
 * </p>
 *
 * @author mameng
 * @since 2024-04-01
 */
@Data
@EqualsAndHashCode(callSuper = false)
@ApiModel(value = "GMaterialInventoryManagement对象", description = "原材料库存管理表")
@TableName(value = "g_material_inventory_management")
public class MaterialCLInventoryManagement extends BaseEntity implements Serializable {

    private static final long serialVersionUID = 1L;

    @ApiModelProperty(value = "库存记录ID")
    @TableId(value = "id", type = IdType.AUTO)
    private String id;

    @ApiModelProperty(value = "物料编码")
    private String materialCode;

    @ApiModelProperty(value = "物料名称")
    private String materialName;

    @ApiModelProperty(value = "物料ID")
    private String materialId;

    @ApiModelProperty(value = "规格型号")
    private String specification;

    @ApiModelProperty(value = "条码编号")
    private String barcodeNumber;

    @ApiModelProperty(value = "批次号")
    private String batchNumber;

    @ApiModelProperty(value = "库存数量")
    private BigDecimal stockQuantity;

    @ApiModelProperty(value = "单位")
    private String unit;

    @ApiModelProperty(value = "库位")
    private String storageLocation;

    @ApiModelProperty(value = "供应商")
    private String supplier;

    @ApiModelProperty(value = "生产日期")
    @JsonFormat(pattern = "yyyy-MM-dd")
    @DateTimeFormat(pattern = "yyyy-MM-dd")
    @JSONField(format = "yyyy-MM-dd")
    private LocalDate productionDate;

    @ApiModelProperty(value = "保质期")
    @JsonFormat(pattern = "yyyy-MM-dd")
    @DateTimeFormat(pattern = "yyyy-MM-dd")
    @JSONField(format = "yyyy-MM-dd")
    private LocalDate expirationDate;

    @ApiModelProperty(value = "入库日期")
    @JsonFormat(pattern = "yyyy-MM-dd")
    @DateTimeFormat(pattern = "yyyy-MM-dd")
    @JSONField(format = "yyyy-MM-dd")
    private LocalDate inventoryDate;

    @ApiModelProperty(value = "可用数量")
    private BigDecimal availableQuantity;

    @ApiModelProperty(value = "冻结数量")
    private BigDecimal frozenQuantity;

    @ApiModelProperty(value = "报废数量")
    private BigDecimal scrapQuantity;



}
